package com.yuyou.fn.timer.task;

import com.xxl.job.core.biz.model.ReturnT;
import com.xxl.job.core.handler.IJobHandler;
import com.xxl.job.core.handler.annotation.JobHander;
import com.yuyou.fn.educational.service.ICourseClassService;
import org.springframework.stereotype.Component;

import javax.annotation.Resource;

@JobHander(value="UpdateEndCourseStatusTask")
@Component
public class UpdateEndCourseStatusTask extends IJobHandler {

    @Resource
    private ICourseClassService courseClassService;

    @Override
    public ReturnT<String> execute(String... params) throws Exception {
        courseClassService.updateEndCourseStatus();
        return ReturnT.SUCCESS;
    }

}
